<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
<body>
<style type="text/css">
  a, a:visited {
    color: #6bb5df !important;
  }

  a:hover {
    color: #CCCCCC !important;
  }
</style>
<div style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1;">
  <h2 style="font-weight: normal;"><%= _("SUBSCRIPTIONS EXPIRING SOON").html_safe %></h2>
    <table border="0" width="100%" id="emailBody" style="background-color: #fff; margin-top: 10px; padding: 0px 0px 15px;" bgcolor="#fff">
      <tr>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Subscription Name") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Account Number") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Organization") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Type") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Quantity") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("SKU") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Contract") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Start Date") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("End Date") %></th>
        <th style="text-align: center; border-collapse: collapse; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Days Remaining") %></th>
      </tr>
      <% @pools.each do |pool| %>
        <tr>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.subscription.name %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.account_number %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.organization.name %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.pool_type %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.quantity %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.subscription.cp_id  %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.contract_number %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.start_date %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.end_date %></td>
          <td align="left" valign="top" style="padding: 0px 20px 5px;"><%= pool.days_until_expiration %></td>
        </tr>
      <% end %>
    </table>
</div>
<br/>
  <%= @report_link %>
</body>
</html>
